/**
 * 
 */
package com.lvmama.rhino.utils;

/**
 * @author wanghongliang
 *
 */
public class LevelCode {
	
	
	public static Integer ONE_LEVEL_CODE_INNER = 1; //内部渠道默认为1
	
	public static Integer ONE_LEVEL_CODE_OUTSIDE = 2; //内部渠道默认为2
	
	public static final String TYPE_ZHUANTI = "zhuanti"; //专题页
	
	public static final String TYPE_SHEBEI = "shebei"; //设备类型
	
	public static final String TYPE_ANDROID = "android"; //渠道为android类别
	
	public static final String TYPE_IOS = "ios"; //渠道为iOS类别
	
	public static final String regexDevice="^(ios|android)(\\d+)(\\.)(\\d+)(\\.)(\\d+)$";//设备code码的规则
	
	/**
	 * 级别识别码根据传入参数来判断
	 * @param type
	 * @return
	 */
	public static String getLevelCode(String type) {
		switch (type) {
		case TYPE_ZHUANTI:
			return "3zhTi";
		case TYPE_SHEBEI:
		    return "2";
		case TYPE_ANDROID:
            return "自有渠道";
        case TYPE_IOS:
            return "自有渠道";
		default:
			return "error";
		}
	}
}
